//
//  Extension+UIImageVIew.swift
//  weiBoSwift
//
//  Created by 刘胤辰 on 16/7/24.
//  Copyright © 2016年 it.com. All rights reserved.
//

import UIKit

extension UIImageView{
    
    //创建便利构造函数
    convenience init(imageName:String){
        
        self.init(image:UIImage(named: imageName))
    }
    
    //封装sd_webImage
    func yc_webImage(urlStr:String?,imageName:String){
        
        let url = NSURL(string: urlStr ?? "")
        self.sd_setImageWithURL(url, placeholderImage: UIImage(named: imageName))
    }
}
